package dao

import (
	"time"
)

// 这是 LiRefundLog 的全局公开dao对象
var LiRefundLogDao = liRefundLogDao{}

// 这是 li_refund_log表 的实体类
type LiRefundLog struct {
	Id                  int       `json:"id" form:"id" v:"id"`                                                          // ID
	AfterSaleNo         string    `json:"after_sale_no" form:"after_sale_no" v:"after_sale_no"`                         // 退单编号
	CreateTime          time.Time `json:"create_time" form:"create_time" v:"create_time"`                               // 创建时间
	ErrorMessage        string    `json:"error_message" form:"error_message" v:"error_message"`                         // 退款失败原因
	IsRefund            bool      `json:"is_refund" form:"is_refund" v:"is_refund"`                                     // 是否已退款
	PayPrice            float64   `json:"pay_price" form:"pay_price" v:"pay_price"`                                     // 交易支付金额
	PaymentName         string    `json:"payment_name" form:"payment_name" v:"payment_name"`                            // 退款方式
	PaymentOutOrderNo   string    `json:"payment_out_order_no" form:"payment_out_order_no" v:"payment_out_order_no"`    // 支付第三方申请流水号
	PaymentReceivableNo string    `json:"payment_receivable_no" form:"payment_receivable_no" v:"payment_receivable_no"` // 支付第三方返回流水
	ReceivableNo        string    `json:"receivable_no" form:"receivable_no" v:"receivable_no"`                         // 第三方返回退款流水号
	RefundReason        string    `json:"refund_reason" form:"refund_reason" v:"refund_reason"`                         // 退款理由
	TotalAmount         float64   `json:"total_amount" form:"total_amount" v:"total_amount"`                            // 金额
	MemberId            string    `json:"member_id" form:"member_id" v:"member_id"`                                     // 会员ID
	OrderSn             string    `json:"order_sn" form:"order_sn" v:"order_sn"`                                        // 订单编号
	OutOrderNo          string    `json:"out_order_no" form:"out_order_no" v:"out_order_no"`                            // 退款申请号码

}

// 注意:这是 LiRefundLog 的私有dao对象
type liRefundLogDao struct {
	Insert func(arg LiRefundLog) int         //插入一条记录
	Update func(arg LiRefundLog) int         //更新一条记录
	Delete func(arg LiRefundLog) int         //删除一条记录
	Select func(arg LiRefundLog) LiRefundLog //获取一条记录
}
